/**
 * 功能描述 
 */
define(function (require, exports, module) {
	var Grid = require("grid");
    var instance = {
        initComponent: function (params,widget) {
        	var editgrid = new Grid({
        		parentNode: ".J-detailgrid",
        		autoRender: false,
        		model:{
        			id:"editgrid",
        			columns:[{
       				   name:"key",
       				   label:"落实",
       				   className:"text-center",
        			   format:function(value,row){
        				   if(value == "pendDescription"){
        					   return "备注"
        				   }else{
        					   return  '<input style="margin-right:6%" '+
       				   		(row.isChecked ? 'checked' : "" )+
       				   		' type="checkbox" id="'+value+'"/>';
        				   }
        			   }
        			},{
        				name:"items",
        				label:"项目"
        			}]
        		}
        	});
        	
        	$(".J-detailgrid th[data-name='key']").html("<input type='checkbox' id='selectAll' style='margin:0px 5px' />落实")
        	
        	 widget.set("editgrid", editgrid);
        }
    };
    module.exports = instance;
});
